package com.system.data.service;

import com.system.data.dao.YmtInfoDao;
import com.system.data.model.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class YmtService {
    @Autowired
    YmtInfoDao ymtInfoDao;

    public List<YmtProductsInfo> findAllYmtProductsInfo(){
        return ymtInfoDao.findAllYmtProductsInfo();
    }

    public List<YmtProductsVarietiesInfo> findAllYmtProductsVarietiesInfo(){
        return ymtInfoDao.findAllYmtProductsVarietiesInfo();
    }

    public List<YmtProductsOriginInfo> findAllYmtProductsOriginInfo(){
        return ymtInfoDao.findAllYmtProductsOriginInfo();
    }

    public List<YmtProductsInfo> findByDateCate(String date, String cateName){
        return ymtInfoDao.findByDateCate(date,cateName);
    }

    public List<YmtProductsInfo> findByStartEnd(String start, String end, String cateName){
        return ymtInfoDao.findByStartEnd(start,end,cateName);
    }

    public List<YmtProductsOriginInfo> findOriginByStartEnd(String start, String end, String cateName,String origin){
        return ymtInfoDao.findOriginByStartEnd(start,end,cateName,origin);
    }

    public List<YmtProductsOriginInfo> findAllOrigin(String marketDate, String cateName){
        return ymtInfoDao.findAllOrigin(marketDate, cateName);
    }

    public List<YmtProductsSichuanJiangxiInfo> findSiChuanJiangXi(String marketDate, String cateName, String province){
        return ymtInfoDao.findSiChuanJiangXi(marketDate, cateName, province);
    }

    public List<YmtProductsInfo> findBySpecies(String marketDate, String species){
        return ymtInfoDao.findBySpecies(marketDate, species);
    }

    public List<YmtProductsHot> findHotByBuyer(String marketDate){
        return ymtInfoDao.findHotByBuyer(marketDate);
    }

    public List<YmtProductsHot> findHotBySeller(String marketDate){
        return ymtInfoDao.findHotBySeller(marketDate);
    }

    public List<YmtProductsOriginInfo> findByDateOriginSpecies(String marketDate,String origin,String species){
        return ymtInfoDao.findByDateOriginSpecies(marketDate,origin,species);
    }

    public List<YmtProductsOriginInfo> findByDateOriginCate(String marketDate,String origin,String cate){
        return ymtInfoDao.findByDateOriginCate(marketDate,origin,cate);
    }

    public List<YmtProductsOriginInfo> findOrderByMarketDate(){
        return ymtInfoDao.findOrderByMarketDate();
    }

    public List<YmtProductsOriginInfo> findMaxPriceOrigin(String marketDate,String cate){
        return ymtInfoDao.findMaxPriceOrigin(marketDate,cate);
    }

    public List<YmtProductsOriginInfo> findMinPriceOrigin(String marketDate,String cate){
        return ymtInfoDao.findMinPriceOrigin(marketDate,cate);
    }

}
